/**
 * @properties={typeid:35,uuid:"E7C0724C-85EB-427E-93FC-1795334D4AEE",variableType:4}
 */
var fveces = null;

/**
 * @properties={typeid:35,uuid:"C94F09A5-C56D-4F27-A4D3-1F3F4DE7CF80",variableType:4}
 */
var fFinal = 0;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"242047C6-D501-480F-935F-6509F64F9AF9"}
 */
function onAction_inicio(event) {
	// main loop
	fveces = 0
	globals.gSenialStop = 0
	globals.gEstadoServicio = "Procesando"
	while (globals.gSenialStop == 0)
	{
		fveces += 1
		if (fveces > 30)
		{
			globals.gSenialStop = 1
		}
		globals.pruebaRece()
		application.sleep(3000)  // 3 segundos
	}
	globals.gEstadoServicio = "Detenido"
}
